package com.qumoyugo.springframework.core.convert.support;

import com.qumoyugo.springframework.core.convert.converter.ConverterRegistry;

/**
 * @author Cedric
 * @date 2021/12/09 11:09
 * @description 实现类型转换服务
 */
public class DefaultConversionService extends GenericConversionService {
    public DefaultConversionService() {
        addDefaultConverterFactory(this);
    }

    private void addDefaultConverterFactory(ConverterRegistry registry) {
        // 添加各类类型转换工厂
        registry.addConverterFactory(new StringToNumberConverterFactory());
    }
}
